

package com.hazelcast.internal.nio;

/**
 * Provides connection listen capabilities.
 */
public interface ConnectionListenable<C extends Connection> {

    /**
     * Registers a ConnectionListener.
     * <p>
     * If the same listener is registered multiple times, it will be notified multiple times.
     *
     * @param listener the ConnectionListener to add.
     * @throws NullPointerException if listener is null.
     */
    void addConnectionListener(ConnectionListener<C> listener);
}
